package com.cecsmsserve.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("news_comment")
public class NewsComment {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    
    @TableField("news_id")
    private Integer newsId;
    
    @TableField("user_id")
    private Integer userId;
    
    @TableField("content")
    private String content;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;
    
    @TableField("status")
    private Integer status; // 0-已删除，1-正常
    
    @TableField(exist = false)
    private String userName;
    
    @TableField(exist = false)
    private String userAvatar;
} 